

package com.hazelcast.spi.impl.eventservice;

import com.hazelcast.cluster.Address;
import com.hazelcast.nio.serialization.IdentifiedDataSerializable;

import java.util.UUID;

/**
 * The result of an Event Registration.
 */
public interface EventRegistration extends IdentifiedDataSerializable {

    /**
     * Returns the event registration ID.
     *
     * @return the event registration ID
     */
    UUID getId();

    /**
     * Returns the {@link EventFilter} attached to this registration.
     *
     * @return the event filter attached to this registration
     */
    EventFilter getFilter();

    /**
     * Returns the subscriber of this registration.
     *
     * @return the subscriber of this registration
     */
    Address getSubscriber();

    /**
     * Returns true if this registration is for locally fired events only.
     *
     * @return true if this registration is for locally fired events only, false otherwise.
     */
    boolean isLocalOnly();

}
